﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class TiposDeReceta : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Session["CadenaDeConexion"] = ConfigurationManager.ConnectionStrings["SIG"].ConnectionString;
    }
    protected void LinkButtonAddNew_Click(object sender, EventArgs e)
    {
        FormViewTipoDeReceta.Visible = true;
    }
    protected void InsertCancelButton_Click(object sender, EventArgs e)
    {
        limpiarFormulario();
    }

    private void limpiarFormulario()
    {
        FormViewTipoDeReceta.Controls.Clear();
        FormViewTipoDeReceta.Visible = false;
    }
    protected void FormViewTipoDeReceta_ItemInserted(object sender, FormViewInsertedEventArgs e)
    {
        limpiarFormulario();
    }
}
